<div class="clear"></div>
<?php echo $html->link(__('New event category', true), array('action'=>'add'),array('class'=>'add_button')); ?>
<div class="clear"></div>
<div class="eventcategories index">
<?php
$index->setData($eventCategories, 'EventCategory');

$index->showFields(array('id','name'));
$index->sortableFields(array('name','id'));


$index->setAction(__('View'), array('action'=>'view', ':EventCategory.id'));
$index->setAction(__('Edit'), array('action'=>'edit', ':EventCategory.id'));
$index->setAction(__('Delete'), array('action'=>'delete', ':EventCategory.id'),$this->helpers,__('Are you sure, you want to delete this event category ?'));
$index->setAction(__('View Events'), array('plugin'=>'events','controller'=>'events','action' => 'index', "category"=>':EventCategory.id'));

$index->addButton(__("Delete Selected"),array("action"=>"bulkDelete",'admin'=>true));

echo $index->display($eventCategories);
?>
</div>